import { ComboBox, Item } from "@adobe/react-spectrum";
import { ListNodes } from "~/lib/server";



export function SelectNode({ defaultSelectedKey = "" }: { defaultSelectedKey?: string }) {

  const { data, error, isLoading } = ListNodes();


  return (


    <ComboBox
      name="nodeId"
      label="网关"
      defaultItems={data}
      defaultSelectedKey={defaultSelectedKey}
      formValue="key"
    >
      {item => <Item>{item.name}</Item>}
    </ComboBox>

  );


}